﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AccountAdmin/AdminMaster.master" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="PRJ_LDW_Eutoliso.AccountAdmin.Endereco.Bairro.Edit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headTile" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="headScript" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body_pre_central" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="body_central_first" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="body_central" runat="server">

     <!-- Start Box -->
    <div class="boxes-full">

        <div class="boxes-padding fullpadding">

            <!-- Start None Split Section -->
            <div class="splitnone">

                <div id="portfolio-container">


                    <!-- Start 4 column portfolio -->
                    <div class="element web">

                        <div class="col1">
                            <div class="wrapper_01">


                              <div class="wrapper_01">
                                    <h3>
                                        <li class="under_02"><a href="/AccountAdmin/Home.aspx" title="" class="active">Página Inicial</a></li>
                                    </h3>
                                    <h3>
                                        <li class="under_02"><a href="#">Anúncios</a></li>
                                    </h3>
                                    <h3>
                                        <li class="under_02"><a href="#">Meus Dados</a></li>
                                    </h3>
                                    <h3>
                                        <li class="under_02"><a href="/AccountAdmin/Endereco/Cidade/Home.aspx" title="" class="active">Cidades</a></li>
                                    </h3>
                                    <h3>
                                        <li class="under_02"><a href="/AccountAdmin/Endereco/Estado/Home.aspx" title="" class="active">Estados</a></li>
                                    </h3>

                                </div>

                            </div>
                        </div>

                    </div>

                    <div class="element graphic">

                        <br />

                        <br />

                        <br />

                    </div>

                    <div class="element logo">
                      <h2>  Editar Bairro </h2>

                        <br /><br /><br />
                                <table>
                                    <tr>
                                        <td>
                                          <h3>  <asp:Label ID="Label2" runat="server" Text="Nome" /> </h3>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtNome" runat="server" Width="285px " CssClass="contacttextform" ></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                           <h3> <asp:Label ID="Label1" runat="server" Text="Rua" /> </h3>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRua" runat="server" Width="286px" CssClass="contacttextform" ></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <h3><asp:Label ID="Label4" runat="server" Text="Número" /> </h3>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtNumero" runat="server" Width="132px" CssClass="contacttextform" ></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="auto-style1">
                                           <h3> <asp:Label ID="Label5" runat="server" Text="Código Postal" Width="100"/> </h3>
                                        </td>
                                        <td class="auto-style1">
                                            <asp:TextBox ID="txtCodPostal" runat="server" CssClass="contacttextform"  Width="132px"></asp:TextBox>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <h3><asp:Label ID="Label6" runat="server" Text="Estado" /> </h3>
                                        </td>
                                        <td>

                                            <asp:DropDownList ID="ddlEstado" CssClass="contacttextform" runat="server" DataSourceID="sqlEstado" DataTextField="Nome" DataValueField="Id" Height="32px" Width="157px" AppendDataBoundItems="True" AutoPostBack="True">
                                                <asp:ListItem Value="0">Selecione</asp:ListItem>
                                            </asp:DropDownList>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <h3><asp:Label ID="Label3" runat="server" Text="Cidade" /> </h3>
                                        </td>
                                        <td>

                                            <asp:DropDownList ID="ddlCidade" runat="server" CssClass="contacttextform"  DataSourceID="sqlCidade" DataTextField="Nome" DataValueField="Nome" Height="32px" Width="157px" AppendDataBoundItems="True" EnableViewState="False">
                                                <asp:ListItem Value="0">Selecione</asp:ListItem>
                                            </asp:DropDownList>

                                        </td>
                                    </tr>
                                </table>
                                <br>
                           
                                <table>
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="btnEditar" runat="server"  Text="Editar" OnClick="btnEditar_Click" CssClass="smallsmoothrectange orangebutton"/>
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="btnCancelar" runat="server"  Text="Cancelar" OnClick="btnCancelar_Click" CssClass="smallsmoothrectange orangebutton"/>
                                        </td>
                                    </tr>
                                </table>

                                <br></br>
                                <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Text="Item atualizado com sucesso!" Visible="False"></asp:Label>
                               
                              
                        <a href="Home.aspx" class="smallsmoothrectange orangebutton">Mostrar todos</a>
                          <asp:SqlDataSource ID="sqlEstado" runat="server" ConnectionString="<%$ ConnectionStrings:eutolisodbConnectionString %>" SelectCommand="SELECT [Id], [Nome] FROM [estado]"></asp:SqlDataSource>
                                <asp:SqlDataSource ID="sqlCidade" runat="server" ConnectionString="<%$ ConnectionStrings:eutolisodbConnectionString %>" SelectCommand="SELECT [Id], [Nome] FROM [cidade] WHERE ([Estado] = @Estado)">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="ddlEstado" Name="Estado" PropertyName="SelectedValue" Type="Int32" />
                                    </SelectParameters>
                                </asp:SqlDataSource>


                        <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=eutolisodbEntities1" DefaultContainerName="eutolisodbEntities1" EnableFlattening="False" EntitySetName="estado" Select="it.[Id], it.[Nome]"></asp:EntityDataSource>
                        <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=eutolisodbEntities1" DefaultContainerName="eutolisodbEntities1" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="cidade">
                        </asp:EntityDataSource>


                    </div>

                    <!-- End 4 column portfolio -->

                </div>

            </div>
            <!-- End None Split Section -->

        </div>

    </div>
    <!-- End Box -->

</asp:Content>